package com.itcc.service.impl;

import com.itcc.dao.VisitLogDao;
import com.itcc.domain.VisitLog;
import com.itcc.service.VisitLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VisitLogServiceImpl implements VisitLogService {

    @Autowired
    private VisitLogDao visitLogDao;

    @Override
    public VisitLog findByUrl(String interfaceUrl) {
        return visitLogDao.findByUrl(interfaceUrl);
    }

    @Override
    public List<VisitLog> getAllUserLogMsg() {
        return visitLogDao.getAllUserLogMsg();
    }

    @Override
    public void insertLog(VisitLog log) {
        visitLogDao.insertLog(log);
    }

    @Override
    public void incrementCount(String interfaceUrl) {
        visitLogDao.incrementCount(interfaceUrl);
    }

    @Override
    public String[] getAllUrl() {
        return visitLogDao.getAllUrl();
    }
}
